package com.systop.dxjj.modules.collectinfo.service.impl;


import com.systop.dxjj.common.pojo.CollectinfoVO;

import com.systop.dxjj.common.utils.R;
import com.systop.dxjj.modules.collectinfo.mapper.CollectinfoMapper;
import com.systop.dxjj.modules.collectinfo.service.CollectinfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CollectinfoServiceImpl implements CollectinfoService {

    @Autowired
    private CollectinfoMapper collectinfoMapper;
    @Override
    public R showCollectinfo() {
        List<CollectinfoVO> list = collectinfoMapper.showCollectinfo();
        return R.ok().put("msg",list);
    }

    @Override
    public R findCollectinfoById(Integer id) {
        CollectinfoVO collectinfoById = collectinfoMapper.findCollectinfoById(id);
        return R.ok().put("id",collectinfoById);
    }

    @Override
    public R findCollectinfoByName(String name) {
        List<CollectinfoVO> collectinfo = collectinfoMapper.findCollectinfoByName(name);
        return R.ok().put("name",collectinfo);
    }


}
